{% extends 'layout/base.html' %}
{% block css %}
    <style>
        .panel-body > .item {
            border-radius: 6px;
            width: 228px;
            border: 1px solid #dddddd;
            margin: 20px 10px;
            float: left;
        }

        .panel-body > .item > .title {
            height: 104px;
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            border-top-left-radius: 6px;
            border-top-right-radius: 6px;
            font-size: 15px;
            text-decoration: none;
        }

        .panel-body > .item > .info {
            padding: 10px 10px;
            display: flex;
            justify-content: space-between;
            border-bottom-left-radius: 6px;
            border-bottom-right-radius: 6px;
            color: #8c8c8c;
        }

    </style>

{% endblock %}


{% block content %}
    <div class="panel panel-default">
        <div class="panel-heading"><h6><i class="fa fa-drivers-license-o" aria-hidden="true"></i> 所有项目</h6></div>
        <div class="panel-body">
            {% for item in it_dict %}
                <div class="item">
                    <a href="{% url 'file' %}?pid={{ item.pk }}" class="title"
                       style="background-color: {{ item.get_color_display }};">{{ item.it_name }}</a>
                    <div class="info">
                        <div>
                            <i class="fa fa-star" aria-hidden="true" style="color: #f0ad4e;"></i>
                        </div>
                        <div>
                            <i class="fa fa-snowflake-o" aria-hidden="true" title="数量"></i>
                            <span>{{ item.filerepository_set.count }}</span>
                        </div>
                    </div>
                </div>
            {% empty %}
                <p class="project">暂无数据</p>
            {% endfor %}
        </div>
    </div>

{% endblock %}


{% block js %}

{% endblock %}